package edu.qichen.onlineBlog.user.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/4/9 21:42
 */
@Data
public class UserUpdateReq {
    @NotNull
    private Long id;
    @NotBlank
    private String username;
    @NotBlank
    private String nickname;
    /**
     * 邮箱格式必须正确且是qq邮箱
     */
    @Pattern(regexp = "^[a-zA-Z0-9_\\-]+@qq.com$")
    private String email;
    @NotBlank
    private String role;
    @TableField("user_pic")
    private String userPic;
}
